package com.itheima.dao.impl;

import com.itheima.dao.BookDao;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;


/**
 * @program: Spring_day01_01_IOC入门程序
 * @description:
 * @author: xuejingjing
 * @create: 2021-07-30 14:18
 **/

@Component
@PropertySource("classpath:jdbc.properties") //加载数据源
public class BookDaoImpl implements BookDao {

    @Value("${jdbc.username}")
    private String userName;
    @Value("${jdbc.password}")
    private String password;


    public void book() {
        System.out.println("BookDao running..."+userName+password);
    }
}
